#ifndef NAVI_CONTROLLER__CONTROLLER_SERVER_HPP_
#define NAVI_CONTROLLER__CONTROLLER_SERVER_HPP_

#include <vector>
#include <pluginlib/class_loader.hpp>
#include "navi_core/controller.hpp"
#include "nav2_util/lifecycle_node.hpp"

namespace navi_controller
{

    class ControllerServer : public nav2_util::LifecycleNode
    {
    public:
        ControllerServer(const rclcpp::NodeOptions &options = rclcpp::NodeOptions());
        ~ControllerServer();

    protected:
        nav2_util::CallbackReturn on_configure(const rclcpp_lifecycle::State &state) override;
        nav2_util::CallbackReturn on_activate(const rclcpp_lifecycle::State &state) override;
        nav2_util::CallbackReturn on_deactivate(const rclcpp_lifecycle::State &state) override;
        nav2_util::CallbackReturn on_cleanup(const rclcpp_lifecycle::State &state) override;
        nav2_util::CallbackReturn on_shutdown(const rclcpp_lifecycle::State &state) override;
        pluginlib::ClassLoader<navi_core::Controller> controller_loader_;
        navi_core::Controller::Ptr controller_;

    private:
        std::string controller_plugin_;
    };

} // namespace navi_controller

#endif // NAVI_CONTROLLER__CONTROLLER_SERVER_HPP_